import { MailerModule } from '@nestjs-modules/mailer';
import { Module } from '@nestjs/common';
import { HandlebarsAdapter } from '@nestjs-modules/mailer/dist/adapters/handlebars.adapter';

@Module({
    imports: [
        MailerModule.forRoot({
            transport: 'smtps://wudanpingdingshang@foxmail.com:ymfzcjshxubqhbej@smtp.qq.com',
            defaults: {
                from: '"dandan" <wudanpingdingshang@foxmail.com>',
            },
            template: {
                dir: __dirname + '/templates',
                adapter: new HandlebarsAdapter(),
                options: {
                    strict: true,
                },
            },
        }),
    ],
})
export class MailModule {}
